package com.yulan.fastkillcourse.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yulan.fastkillcourse.model.CourseMargin;
import org.apache.ibatis.annotations.Update;

public interface CourseMarginMapper extends BaseMapper<CourseMargin> {
    @Update("update course_margin set margin = margin -1 where cid = #{cid} and margin >0")
    boolean reduceMargin(int cid);
}
